﻿using System;
using System.Drawing;

namespace Spencen.Mobile.Markup.Converters
{
    public class BrushConverter : Converter<Brush>
    {
        private readonly ColorConverter _colorConverter = new ColorConverter();

        public override Brush ConvertFromString( string input, Type toType )
        {
            var color = _colorConverter.ConvertFromString( input, typeof( Color ) );
            return new SolidBrush( color );
        }
    }
}
